package com.whately.core.base.constant;

public enum VerifyGenerateTypeEnum {
    //默认文本
    local_text(0),

    //滑块
    local_slider(1),

    //极验
    //gee_test(2),



    ;

    Integer value;

    private VerifyGenerateTypeEnum(Integer value) {
        this.value = value;
    }

    public static VerifyGenerateTypeEnum getVerifyCodeType(Integer value) {
        if(value==null||value<=0){
            return null;
        }
        VerifyGenerateTypeEnum[] all = values();

        for(int i = 0;  i< all.length; ++i) {
            VerifyGenerateTypeEnum v = all[i];
            if (v.value.equals(value)) {
                return v;
            }
        }

        return null;
    }

    public Integer getValue() {
        return this.value;
    }
}
